
import 'package:flutter/material.dart';

class WyContainer extends StatefulWidget {
  @override
  _WyContainerState createState() => _WyContainerState();
}

class _WyContainerState extends State<WyContainer> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Container"),

      ),
      body: SingleChildScrollView(
          child: Column(
        children: [
          Container(
            child: Text('老王'),
          ),
          SizedBox(height: 20,),
          Container(
            color: Colors.blue,
            child: Text('老王'),
          ),
          SizedBox(height: 20,),

          Container(
            color: Colors.blue,
            child: Text('老王'),
            padding: EdgeInsets.all(20),
          ),
          SizedBox(height: 20,),
          Container(
            child: Text('老王，一个有态度的程序员'),
            decoration: BoxDecoration(
                shape: BoxShape.circle,
                color: Colors.blue
            ),
          ),
          SizedBox(height: 20,),
          Container(
            child: Text('老王，一个有态度的程序员'),
            padding: EdgeInsets.symmetric(horizontal: 10),
            decoration: BoxDecoration(
                shape: BoxShape.rectangle,
                borderRadius: BorderRadius.all(Radius.circular(20)),
                color: Colors.blue
            ),
          ),
          SizedBox(height: 20,),

          Container(
            child: Text('老王，一个有态度的程序员'),
            padding: EdgeInsets.symmetric(horizontal: 10),
            decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(12),
              border: Border.all(
                color: Colors.blue,
                width: 2,
              ),
            ),
          ),
          SizedBox(height: 20,),
          Container(
            height: 200,
            width: 200,
            decoration: BoxDecoration(
              image:  DecorationImage(
                image: NetworkImage(
                    'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg'),
                fit: BoxFit.cover,
              ),
              border: Border.all(
                color: Colors.blue,
                width: 2,
              ),
              borderRadius: BorderRadius.circular(12),
            ),
          ),
          SizedBox(height: 20,),
          Container(
            height: 200,
            width: 200,
            decoration: BoxDecoration(
              image: DecorationImage(
                image: NetworkImage(
                    'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg'),
                fit: BoxFit.cover,
              ),
              border: Border.all(
                color: Colors.blue,
                width: 2,
              ),
              shape: BoxShape.circle,
            ),
          ),
          SizedBox(height: 20,),

          Container(
            color: Colors.blue,
            child: Text('老王，一个有态度的程序员'),
            alignment: Alignment.center,
          ),
          SizedBox(height: 20,),
          Container(
            color: Colors.blue,
            child: Text('老wang，一个有态度的程序员'),
            alignment: Alignment.center,
            height: 60,
            width: 200,
          ),
          SizedBox(height: 20,),
          Container(
            color: Colors.blue,
            child: Text('老王，一个有态度的程序员'),
            alignment: Alignment.center,
            constraints: BoxConstraints.tightForFinite(
                width: 200
            ),
          ),
          SizedBox(height: 20,),

          Container(
            color: Colors.blue,
            child: Text('老王，一个有态度的程序员'),
            alignment: Alignment.center,
            constraints: BoxConstraints.tightForFinite(
                width: 200
            ),
            transform: Matrix4.rotationZ(0.5),
          ),

          Container(height: 200,),


        ],
      ), )


    );
  }
}
